{% load myfilters %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>filter</title>
</head>
<body>

<h1>safe</h1>
<p>原样输出内容, 不进行转移处理</p>
{{ html | safe}}
<h1>length</h1>
<p>求内容的长度</p>
{{ alist | length }}
{{ html | length }}
<h1>default</h1>
<p>变量不存在时返回一个默认值</p>
{{ city | default:'abc' }}
<h1>date</h1>
<p>对日期格式进行格式化输出</p>
{{ today }} <br>
{{ today | date:'Y年m月j日  H时i分s秒' }}


<ul>
    {% for i in alist %}
        <li>{{ i | filterc }}</li>
    {% endfor %}
</ul>

</body>
</html>